//
//  YeeKindVC.m
//  YeeShopProject
//
//  Created by CoderYee on 2017/2/28.
//  Copyright © 2017年 CoderYee. All rights reserved.
//

#import "YeeKindVC.h"
#import "YeeKindPrimaryTableView.h"
#import "YeeKindCollectionView.h"
#import "YeeKindListVC.h"

@interface YeeKindVC ()
{
    NSMutableDictionary     *_dictionary;
    YeeKindPrimaryTableView *_primaryTableView;
    YeeKindPrimaryTableView *_secondTableView;
    YeeKindCollectionView   *_kindCollectionView;
}
@end

@implementation YeeKindVC

- (void)viewDidLoad
{
    [super viewDidLoad];
}
-(void)addOwnViews
{
    [super addOwnViews];
    [self addprimaryTableView];
    [self addsecondTableView];
    [self addKindCollectionView];
}
-(void)addNavbarView
{
    [super addNavbarView];
}
-(void)configOwnViews
{
    [super configOwnViews];
}
-(void)addprimaryTableView
{
    _primaryTableView=[[YeeKindPrimaryTableView alloc] initWithFrame:CGRectMake(0, 0, kMainScreenWidth/5, kMainScreenHeight-64-49)];
    [self.view addSubview:_primaryTableView];
}
-(void)addsecondTableView
{
    
    _secondTableView=[[YeeKindPrimaryTableView alloc] initWithFrame:CGRectMake(kMainScreenWidth/5, 0, kMainScreenWidth/5, kMainScreenHeight-64-49)];
    [self.view addSubview:_secondTableView];

    
}
-(void)addKindCollectionView
{
    _kindCollectionView=[[YeeKindCollectionView alloc] initWithFrame:CGRectMake(kMainScreenWidth/5*2.0, 0, kMainScreenWidth/5*3, kMainScreenHeight-64-49)];
    @weakify(self);
    [_kindCollectionView.clickSubject subscribeNext:^(id  _Nullable x)
     {
         @strongify(self);
         YeeKindListVC *listVC=[[YeeKindListVC alloc] init];
         listVC.hidesBottomBarWhenPushed=YES;
         [self.navigationController pushViewController:listVC animated:YES];
    }];
    [self.view addSubview:_kindCollectionView];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
